const state = () => ({
    stuNum: "",
    password: "",
})

const getters = {
    stuNum: state => state.stuNum,
    password: state => state.password
}
const actions = {
    login({commit}, user) {
        commit('login', user)
    }
}
const mutations = {
    login(state, payload) {
        state.stuNum = payload.stuNum
        state.password = payload.password
    }
}


export default {
    namespaced: true,
    state,
    getters,
    actions,
    mutations,
}
